package com.zsrt.exam.entity;


/**
 * 准考证号码 1001 
 * 密码 姓名 年龄 所属省份 户籍所在地city 联系方式13 语文分数150 数学分数 英语分数 理综300 角色（admin:管理员  user：普通用户）
 * UserEntity 实现一个接口
 */
public class UserEntity implements Comparable<UserEntity> {
	
	@Override
	public int compareTo(UserEntity user) {
		return  user.getTotal()-this.getTotal();
	}
	
	
	private String card;
	private String name;
	private String password;
	private int    age;
	private String province;
	
	/**
	 * 户籍所在地
	 */
	private String city;
	private String phone;
	
	
	private int    chinese;
	private int   math;
	private int   enghish;
	
	/**
	 * 理综300
	 */
	private int other;
	
	
	public int getTotal(){
		return chinese+math+enghish+other;
	}
	
	
	private String role;
	public String getCard() {
		return card;
	}
	public void setCard(String card) {
		this.card = card;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public String getProvince() {
		return province;
	}
	public void setProvince(String province) {
		this.province = province;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public int getChinese() {
		return chinese;
	}
	public void setChinese(int chinese) {
		this.chinese = chinese;
	}
	public int getMath() {
		return math;
	}
	public void setMath(int math) {
		this.math = math;
	}
	public int getEnghish() {
		return enghish;
	}
	public void setEnghish(int enghish) {
		this.enghish = enghish;
	}
	public int getOther() {
		return other;
	}
	public void setOther(int other) {
		this.other = other;
	}
	public String getRole() {
		return role;
	}
	public void setRole(String role) {
		this.role = role;
	}
	@Override
	public String toString() {
		return "UserEntity [card=" + card + ", name=" + name + ", password=" + password + ", age=" + age + ", province="
				+ province + ", city=" + city + ", phone=" + phone + ", chinese=" + chinese + ", math=" + math
				+ ", enghish=" + enghish + ", other=" + other + ", role=" + role + "]";
	}
	
	
	
	
	
	
	

}
